Skip to content

add jpeg codec and testcases#81

Open
konstibob wants to merge 1 commit into
zarr-developers:mainfrom
konstibob:feat/jpeg-codec
Open

add jpeg codec and testcases#81
konstibob wants to merge 1 commit into
zarr-developers:mainfrom
konstibob:feat/jpeg-codec

Conversation

@konstibob

Copy link
Copy Markdown

Add JPEG codec (v3)

Implements an array → bytes JPEG codec for the Zarr v3 codec pipeline, compatible with neuroglancer's precomputed "jpeg" chunk encoding.

  • Encodes a uint8 chunk as a baseline JPEG image and decodes it back.
  • The innermost chunk axis is treated as the channel axis: extent 3 → RGB, otherwise grayscale (1 channel).
  • Configurable quality (0–100, default 90); validated on construction.
  • Serializes to / deserializes from zarr.json ("name": "jpeg", "quality": …).

Notes / limitations

  • Lossy — must not be used where exact values matter
  • Only supports uint8; other dtypes are rejected with a clear error.
  • Chunks exceeding JPEG's 65535-per-dimension limit are factored to fit, or rejected if no factorization works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant